//调用rustSBI服务 控制台打印
pub fn console_putchar(c: usize) {
    sbi_rt::legacy::console_putchar(c);
}

//调用rustSBI服务，关机功能，failure是否正常退出
pub fn shutdown(failure: bool) -> ! {
    use sbi_rt::{NoReason, Shutdown, SystemFailure, system_reset};
    if !failure {
        system_reset(Shutdown, NoReason); //正常退出
    } else {
        system_reset(Shutdown, SystemFailure); //异常退出
    }
    unreachable!()
}
